package com.hos.check.common.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.criterion.Criterion;

import com.hos.check.common.dao.GenericDAO;

public interface GenericService<T, PK extends Serializable> {
	
	  public abstract PK save(T paramT);

	  public abstract void saveOrUpdate(T paramT);

	  public abstract T get(PK paramPK);

	  public abstract void update(T paramT);

	  public abstract void delete(T paramT);

	  public abstract Query getQuery(String paramString);

	  public abstract List<T> findAll();

	  public abstract void flush();

	  public abstract List<T> findByCriteria(Criterion[] paramArrayOfCriterion);

	  public abstract Class<T> getPersistentClass();
	  
	  public GenericDAO<T, PK> getGenericDAO();
	  
	  public abstract List<T> findPage(String hql ,int pageno,int pagesize);
	  
	  public abstract List<T> find(String hql, Object... values);

}
